/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cpproject1;

import java.util.EventObject;

/**
 *
 * @author Samrat Bhattacharya
 */
public class MazeTest {

    /**
     * 
     * @param args
     */
    public static void main(String args[]) {
        Maze m = new Maze(15, 4);
        m.subscribeToUIEvents(new UpdateUIEventListener() {

            @Override
            public void updateUI(EventObject ob) {
                MazeCellType dungeon[][] = (MazeCellType[][]) ob.getSource();
                DisplayDungeon(dungeon);
            }
        });
        m.startGame();
    }

    /**
     * 
     * @param dungeon
     */
    public static void DisplayDungeon(MazeCellType[][] dungeon) {
        for (int i = 0; i < dungeon.length; i++) {
            for (int j = 0; j < dungeon[i].length; j++) {
                System.out.print(dungeon[i][j].ordinal());
            }
            System.out.println();
        }
    }
}
